package so.sao.code.service.service;

import org.springframework.web.multipart.MultipartFile;

import so.sao.code.service.domain.ThirdPartyCodeFileInfoProvider;
import so.sao.code.service.domain.UserBaseInfoWrapper;
import so.sao.code.service.infrastructure.model.vo.ThirdPartCodeFileVO;
import so.sao.sso.feign.dto.IsvUserDTO;

/**
 * 第三方码文件处理。
 * 
 * @author wei.wang
 *
 */
public interface ThirdPartyCodeFileHandleService {

	void validate(IsvUserDTO user, MultipartFile file, ThirdPartCodeFileVO rex);
	/**
	 * usebaseInfo 获取
	 * 
	 * @param userDto
	 * @return
	 */
	UserBaseInfoWrapper wrapUsebaseInfo(IsvUserDTO userDto);

	/**
	 * 下载并保存。
	 * 
	 * @param usebaseInfo
	 * @param fileInfo
	 * @param file
	 * @return
	 */
	ThirdPartyCodeFileInfoProvider saveFile(UserBaseInfoWrapper usebaseInfo, ThirdPartyCodeFileInfoProvider wrapper,
			MultipartFile file);

	/**
	 * 处理文件
	 * 
	 * @param user
	 * @param wrapper
	 */
	void doProcess(UserBaseInfoWrapper user, ThirdPartyCodeFileInfoProvider wrapper);

	/**
	 * 异步处理文件
	 * 
	 * @param user
	 * @param wrapper
	 */
	void doAsyncProcess(UserBaseInfoWrapper user, ThirdPartyCodeFileInfoProvider wrapper);

	/**
	 * mapping
	 * 
	 * @param user
	 * @param wrapper
	 */
	boolean mapping(UserBaseInfoWrapper user, ThirdPartyCodeFileInfoProvider wrapper);

	/**
	 * sendFFW
	 * 
	 * @param user
	 * @param wrapper
	 */
	void sendFFW(UserBaseInfoWrapper user, ThirdPartyCodeFileInfoProvider wrapper);
	
	/**
	 * pushSignmatrix
	 * 
	 * @param user
	 * @param wrapper
	 */
	void pushSignmatrix(UserBaseInfoWrapper user, ThirdPartyCodeFileInfoProvider wrapper);

}
